home *** CD-ROM | disk | FTP | other *** search
/ The Guided Tour of Multimedia (Second Edition) / The Guided Tour of Multimedia (Second Edition).iso / trials / qtw111 / samples / libmain.cpp < prev    next >
C/C++ Source or Header  |  1994-01-11  |  1KB  |  51 lines

  1.  
  2. // ---------------------------------------------------------------------
  3. //
  4. // LIBMAIN.CPP  - QuickTime for Windows Sample Decompressor
  5. //
  6. //                Version 1.1
  7. //
  8. //                (c) 1988-1993 Apple Computer, Inc. All Rights Reserved.
  9. //
  10. // ---------------------------------------------------------------------
  11.  
  12.  
  13. // Windows header files
  14. #include <windows.h>
  15. #include <windowsx.h>
  16.  
  17. // Compiler header files
  18. #include <string.h>
  19.  
  20. // Application header files
  21. #include "prototyp.hp"
  22.  
  23. // Local data
  24. static HINSTANCE hInstThisMod ;
  25.  
  26. /* function LibMain:
  27.    DLL Initialization
  28. */
  29. int FAR PASCAL LibMain( HINSTANCE hInstance
  30.                       , WORD wDataSeg
  31.                       , WORD wHeapSize
  32.                       , LPSTR lpszCmdLine
  33.                       )
  34. {
  35.     // perform common initialization
  36.     if ( wHeapSize > 0)
  37.         UnlockData( 0) ;
  38.     hInstThisMod = hInstance ; // save instance handle
  39.  
  40.     // successful return
  41.     return 1 ;
  42. } // LibMain
  43.  
  44. /* function GetInstOfThisMod:
  45.    Get the instance handle of this module
  46. */
  47. HINSTANCE GetInstOfThisMod()
  48. {
  49.     return hInstThisMod ;
  50. } // GetInstOfThisMod
  51.